<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script async src="//cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
  <link href="//cdn.jsdelivr.net/npm/pace-js@1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">








<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />










  <meta name="baidu-site-verification" content="OTG88475E6" />









  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />


<link href="https://fonts.loli.net/css?family=EB+Garamond:400,400i,700,700i|Noto+Serif+SC:400,500,700&display=swap&subset=chinese-simplified" rel="stylesheet">




  

<link href="//cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next%20.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="知识拓展," />





  <link rel="alternate" href="/atom.xml" title="孤桜懶契" type="application/atom+xml" />






<meta name="description" content="1、取得每个部门最高薪水的人员名称第一步：取得每个部门最高薪水(按照部门编号分组找出每一个部门最大值) select      deptno,max(sal) maxsal  from      emp  group by      deptno;+——–+———-+| deptno | maxsal   |+——–+———-+|     10 |  5000.00 ||     20 |  30">
<meta property="og:type" content="article">
<meta property="og:title" content="MYSQL——27道练习题">
<meta property="og:url" content="https://gylq.gitee.io/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/index.html">
<meta property="og:site_name" content="孤桜懶契">
<meta property="og:description" content="1、取得每个部门最高薪水的人员名称第一步：取得每个部门最高薪水(按照部门编号分组找出每一个部门最大值) select      deptno,max(sal) maxsal  from      emp  group by      deptno;+——–+———-+| deptno | maxsal   |+——–+———-+|     10 |  5000.00 ||     20 |  30">
<meta property="article:published_time" content="2020-10-14T21:46:24.328Z">
<meta property="article:modified_time" content="2020-10-21T13:09:37.086Z">
<meta property="article:author" content="孤桜懶契">
<meta property="article:tag" content="知识拓展">
<meta name="twitter:card" content="summary">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":true},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":true,"transition":{"post_block":"flipYIn","post_header":"perspectiveRightIn","post_body":"perspectiveLeftIn","coll_header":"swoopIn","sidebar":"shrinkIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://gylq.gitee.io/2020/10/15/MYSQL——27道练习题/"/>





<!-- 设置文章需要密码访问 -->
<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！');
                history.back();
            }
        }
    })();
</script>

  <title>MYSQL——27道练习题 | 孤桜懶契</title>
  





<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?b56c2f3ac99ab0c4efa4cba7755ec64a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>





  
      <!-- 球型气泡标签云 -->
      <script type="text/javascript" src="/js/src/bubble.js"></script>
  

  
      <!-- haoyuePlayer 播放器，移动端大小适配-->
      <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
  

<meta name="generator" content="Hexo 4.2.1"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <!--fork me from github-->
    <a href="https://space.bilibili.com/13563835" target="_blank" rel="noopener" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#64CEAA; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">孤桜懶契</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description">Run</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-导航">
          <a href="/gylq-navigation/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-link"></i> <br />
            
            导航
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-life">
          <a href="/life/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-apple"></i> <br />
            
            生活
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>






<link href="https://cdn.bootcss.com/dplayer/1.25.0/DPlayer.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/dplayer/1.25.0/DPlayer.min.js"></script>
<script src="https://cdn.bootcss.com/hls.js/0.12.4/hls.min.js"></script>
<script>
    function __create__dps(videos) {
        for (i = 0; i < videos.length; i++) {
            new DPlayer({
                container: document.getElementById('__dp' + i),
                screenshot: true,
                video: {
                    url: videos[i]
                }
            });
        }
        // 修正 Mirages 1.7.10 视频比例错误
        setTimeout(() => {
            let __elementList = document.querySelectorAll('.video-container.video-4-3');
            for (let __element of __elementList) {
                __element.className = 'video-container video-16-9';
                __element.setAttribute('style', 'position: initial;');
            }
        }, 300);
    }
</script> </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://gylq.gitee.io/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="孤桜懶契">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/qq.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="孤桜懶契">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">MYSQL——27道练习题</h2>
        

        <div class="post-meta">
          <span class="post-time">

             

             

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2020-10-15T05:46:24+08:00">
                2020-10-15
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/MySQL/" itemprop="url" rel="index">
                    <span itemprop="name">MySQL</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          
             <span id="/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/" class="leancloud_visitors" data-flag-title="MYSQL——27道练习题">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          <!--
          
          -->

          
            <span class="post-wordcount">
              
                
                  <span class="post-meta-divider">|</span>
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                <span title="字数">
                  3.3k
                </span>
              

              

              
            </span>
          

          <!-- 隐藏文章内标题下，内容描述
          
          -->

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="1、取得每个部门最高薪水的人员名称"><a href="#1、取得每个部门最高薪水的人员名称" class="headerlink" title="1、取得每个部门最高薪水的人员名称"></a>1、取得每个部门最高薪水的人员名称</h1><p><em>第一步：取得每个部门最高薪水</em>(按照部门编号分组找出每一个部门最大值)</p>
<pre><code>select 
    deptno,max(sal) maxsal 
from 
    emp 
group by 
    deptno;</code></pre><p>+——–+———-+<br>| deptno | maxsal   |<br>+——–+———-+<br>|     10 |  5000.00 |<br>|     20 |  3000.00 |<br>|     30 |  2850.00 |<br>+——–+———-+<br>第二步：自连接（将以上的查询结果当做一张临时表t，t和emp表连接，条件:t.deptno=e.deptno and t.maxsal = e.sal)</p>
<pre><code>select 
    e.ename,t.* 
from 
    emp e 
join 
    (select deptno,max(sal) maxsal from emp group by deptno) t 
on 
    t.maxsal=e.sal and t.deptno=e.deptno;</code></pre><p>+——-+——–+———+<br>| ename | deptno | maxsal  |<br>+——-+——–+———+<br>| BLAKE |     30 | 2850.00 |<br>| SCOTT |     20 | 3000.00 |<br>| KING  |     10 | 5000.00 |<br>| FORD  |     20 | 3000.00 |<br>+——-+——–+———+</p>
<h1 id="2、哪些人的薪水在部门的平均薪资之上"><a href="#2、哪些人的薪水在部门的平均薪资之上" class="headerlink" title="2、哪些人的薪水在部门的平均薪资之上"></a>2、哪些人的薪水在部门的平均薪资之上</h1><p><em>第一步:找出每个部门的平均薪资</em></p>
<pre><code>select 
    deptno,avg(sal) avgsal
from 
    emp
group by
    deptno;</code></pre><p>+——–+————-+<br>| deptno | avgsal      |<br>+——–+————-+<br>|     10 | 2916.666667 |<br>|     20 | 2175.000000 |<br>|     30 | 1566.666667 |<br>+——–+————-+</p>
<p><em>第二步：将以上查询结果当做t表，t和emp表连接</em><br><strong>条件：部门编号相同，并且emp的sal大于t表的avgsal</strong></p>
<pre><code>select 
    e.ename,t.deptno,e.sal
from 
    emp e 
join
    (select deptno,avg(sal) avgsal from emp group by deptno) t
on
    e.sal&gt;t.avgsal and e.deptno=t.deptno;</code></pre><p>+——-+——–+———+<br>| ename | deptno | sal     |<br>+——-+——–+———+<br>| ALLEN |     30 | 1600.00 |<br>| JONES |     20 | 2975.00 |<br>| BLAKE |     30 | 2850.00 |<br>| SCOTT |     20 | 3000.00 |<br>| KING  |     10 | 5000.00 |<br>| FORD  |     20 | 3000.00 |<br>+——-+——–+———+</p>
<h1 id="3、取得部门中（所有人的）平均的薪资等级"><a href="#3、取得部门中（所有人的）平均的薪资等级" class="headerlink" title="3、取得部门中（所有人的）平均的薪资等级"></a>3、取得部门中（所有人的）平均的薪资等级</h1><blockquote>
<p>平均的薪水等级：先计算每一个薪水的等级，然后找出薪水等级的平均值。<br>平均薪水的等级：先计算平均薪水，然后找出每个平均薪水的等级值。</p>
</blockquote>
<p><em>第一步：找出每个人的薪水等级</em></p>
<pre><code>select
    e.ename,e.sal,e.deptno,s.grade
from
    emp e
join
    salgrade s
on
    e.sal between s.losal and s.hisal
order by
    deptno;</code></pre><p>+——–+———+——–+——-+<br>| ename  | sal     | deptno | grade |<br>+——–+———+——–+——-+<br>| CLARK  | 2450.00 |     10 |     4 |<br>| KING   | 5000.00 |     10 |     5 |<br>| MILLER | 1300.00 |     10 |     2 |<br>| ADAMS  | 1100.00 |     20 |     1 |<br>| SCOTT  | 3000.00 |     20 |     4 |<br>| FORD   | 3000.00 |     20 |     4 |<br>| JONES  | 2975.00 |     20 |     4 |<br>| SMITH  |  800.00 |     20 |     1 |<br>| ALLEN  | 1600.00 |     30 |     3 |<br>| JAMES  |  950.00 |     30 |     1 |<br>| WARD   | 1250.00 |     30 |     2 |<br>| MARTIN | 1250.00 |     30 |     2 |<br>| TURNER | 1500.00 |     30 |     3 |<br>| BLAKE  | 2850.00 |     30 |     4 |<br>+——–+———+——–+——-+</p>
<p><em>基于以上的结果继续按照deptno分组，求grade的平均值</em></p>
<pre><code>select
    e.deptno,avg(s.grade) avggrade
from
    emp e
join
    salgrade s
on
    e.sal between s.losal and s.hisal
group by
    e.deptno;</code></pre><p>+——–+———-+<br>| deptno | avggrade |<br>+——–+———-+<br>|     10 |   3.6667 |<br>|     20 |   2.8000 |<br>|     30 |   2.5000 |<br>+——–+———-+</p>
<h1 id="4、不准用组函数（MAX），取得最高薪水"><a href="#4、不准用组函数（MAX），取得最高薪水" class="headerlink" title="4、不准用组函数（MAX），取得最高薪水"></a>4、不准用组函数（MAX），取得最高薪水</h1><p><em>第一种，降序，limit 1</em></p>
<pre><code>select ename,sal from emp order by sal desc limit 1;</code></pre><p>+——-+———+<br>| ename | sal     |<br>+——-+———+<br>| KING  | 5000.00 |<br>+——-+———+</p>
<p><em>第二种，表的自连接</em></p>
<blockquote>
<p>select sal from emp where sal not in(select distinct a.sal from (select sal from emp) a join (select sal from emp) b on a.sal&lt;b.sal);<br>+———+<br>| sal     |<br>+———+<br>| 5000.00 |<br>+———+<br>select distinct a.sal from (select sal from emp) a join (select sal from emp) b on a.sal&lt;b.sal;<br>a表<br>+———+<br>|  800.00 |<br>| 1600.00 |<br>| 1250.00 |<br>| 2975.00 |<br>| 1250.00 |<br>| 2850.00 |<br>| 2450.00 |<br>| 3000.00 |<br>| 5000.00 |<br>| 1500.00 |<br>| 1100.00 |<br>|  950.00 |<br>| 3000.00 |<br>| 1300.00 |<br>+———+<br>b表<br>+———+<br>|  800.00 |<br>| 1600.00 |<br>| 1250.00 |<br>| 2975.00 |<br>| 1250.00 |<br>| 2850.00 |<br>| 2450.00 |<br>| 3000.00 |<br>| 5000.00 |<br>| 1500.00 |<br>| 1100.00 |<br>|  950.00 |<br>| 3000.00 |<br>| 1300.00 |<br>+———+</p>
</blockquote>
<h1 id="5、取得平均薪水最高的部门的部门编号"><a href="#5、取得平均薪水最高的部门的部门编号" class="headerlink" title="5、取得平均薪水最高的部门的部门编号"></a>5、取得平均薪水最高的部门的部门编号</h1><p><em>第一种方案 //max</em><br><strong>第一步：取得每个部门的平均薪水</strong></p>
<pre><code>select deptno,avg(sal) avgsal from emp group by deptno;</code></pre><p>+——–+————-+<br>| deptno | avgsal      |<br>+——–+————-+<br>|     10 | 2916.666667 |<br>|     20 | 2175.000000 |<br>|     30 | 1566.666667 |<br>+——–+————-+<br><strong>第二步把上表当做临时表，然后用max进行求最大值的部门编号</strong><br>        select t.deptno,max(t.avgsal) maxavgsal from (select deptno,avg(sal) avgsal from emp group by deptno) t;<br>+——–+————-+<br>| deptno | maxavgsal   |<br>+——–+————-+<br>|     10 | 2916.666667 |<br>+——–+————-+</p>
<p><em>第二个方案 //降序取第一个</em><br><strong>第一步：取得每个部门的平均薪水</strong><br><strong>第二步：将上表当做临时表，通过avgsal进行降序排序，然后limit 1取第一行</strong></p>
<pre><code>select deptno,avg(sal) avgsal from emp group by deptno order by avgsal desc limit 1;</code></pre><p>+——–+————-+<br>| deptno | avgsal      |<br>+——–+————-+<br>|     10 | 2916.666667 |<br>+——–+————-+</p>
<h1 id="6、取得平均薪水最高的部门的部门名称"><a href="#6、取得平均薪水最高的部门的部门名称" class="headerlink" title="6、取得平均薪水最高的部门的部门名称"></a>6、取得平均薪水最高的部门的部门名称</h1><p><em>第一步，取得平均薪水最高的部门</em></p>
<pre><code>select avg(sal) 平均薪水, deptno from emp group by deptno order by 平均薪水 desc limit 1;</code></pre><p>+————-+——–+<br>| 平均薪水    | deptno |<br>+————-+——–+<br>| 2916.666667 |     10 |<br>+————-+——–+</p>
<p><em>第二步，取得最高的部门名称</em></p>
<pre><code>select d.dname,t.平均薪水 from dept d join (select avg(sal) 平均薪水, deptno from emp group by deptno order by 平均薪水 desc limit 1) t on d.deptno=t.deptno;</code></pre><p>+————+————-+<br>| dname      | 平均薪水    |<br>+————+————-+<br>| ACCOUNTING | 2916.666667 |<br>+————+————-+</p>
<h1 id="7、求平均薪水的等级最低的部门的部门名称"><a href="#7、求平均薪水的等级最低的部门的部门名称" class="headerlink" title="7、求平均薪水的等级最低的部门的部门名称"></a>7、求平均薪水的等级最低的部门的部门名称</h1><p><em>第一步，求平均薪水的等级最低的部门</em></p>
<pre><code>select t.*,s.grade from salgrade s join (select avg(sal) avgsal, deptno from emp group by deptno) t on t.avgsal between losal and hisal order by grade asc limit 1;</code></pre><p>+————-+——–+——-+<br>| avgsal      | deptno | grade |<br>+————-+——–+——-+<br>| 1566.666667 |     30 |     3 |<br>+————-+——–+——-+</p>
<p><em>第二步，找出部门名称</em><br>        select d.dname, p.grade from dept d join(select t.*,s.grade from salgrade s join (select avg(sal) avgsal, deptno from emp group by deptno) t on t.avgsal between losal and hisal order by grade asc limit 1) p on d.deptno = p.deptno;<br>+——-+——-+<br>| dname | grade |<br>+——-+——-+<br>| SALES |     3 |<br>+——-+——-+</p>
<h1 id="8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名"><a href="#8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名" class="headerlink" title="8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名"></a>8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名</h1><p><strong>领导</strong><br>        mysql&gt; select distinct mgr from emp;<br>        +——+<br>        | mgr  |<br>        +——+<br>        | 7902 |<br>        | 7698 |<br>        | 7839 |<br>        | 7566 |<br>        | NULL |<br>        | 7788 |<br>        | 7782 |<br>        +——+</p>
<p><em>第一步，求出普通员工的最高薪水</em></p>
<pre><code>select max(sal) from emp where empno not in(select distinct mgr from emp where mgr is not NULL);</code></pre><p>+———-+<br>| max(sal) |<br>+———-+<br>|  1600.00 |<br>+———-+</p>
<p><em>第二步，求出比普通员工最高薪水还高的领导</em><br><strong>比普通员工薪水最高薪水还高的就是领导</strong><br>         select ename,sal from emp where sal&gt;(select max(sal) from emp where empno not in(select distinct mgr from emp where mgr is not NULL));<br>+——-+———+<br>| ename | sal     |<br>+——-+———+<br>| JONES | 2975.00 |<br>| BLAKE | 2850.00 |<br>| CLARK | 2450.00 |<br>| SCOTT | 3000.00 |<br>| KING  | 5000.00 |<br>| FORD  | 3000.00 |<br>+——-+———+</p>
<h1 id="9、取得薪水最高的前五名员工"><a href="#9、取得薪水最高的前五名员工" class="headerlink" title="9、取得薪水最高的前五名员工"></a>9、取得薪水最高的前五名员工</h1><pre><code>select ename,sal from emp order by sal desc limit 0,5;</code></pre><p>+——-+———+<br>| ename | sal     |<br>+——-+———+<br>| KING  | 5000.00 |<br>| FORD  | 3000.00 |<br>| SCOTT | 3000.00 |<br>| JONES | 2975.00 |<br>| BLAKE | 2850.00 |<br>+——-+———+</p>
<h1 id="10、取得薪水最高的第六到第十名员工"><a href="#10、取得薪水最高的第六到第十名员工" class="headerlink" title="10、取得薪水最高的第六到第十名员工"></a>10、取得薪水最高的第六到第十名员工</h1><pre><code>select ename,sal from emp order by sal desc limit 5,5;</code></pre><p>+——–+———+<br>| ename  | sal     |<br>+——–+———+<br>| CLARK  | 2450.00 |<br>| ALLEN  | 1600.00 |<br>| TURNER | 1500.00 |<br>| MILLER | 1300.00 |<br>| WARD   | 1250.00 |<br>+——–+———+</p>
<h1 id="11、取得最后入职的5名员工"><a href="#11、取得最后入职的5名员工" class="headerlink" title="11、取得最后入职的5名员工"></a>11、取得最后入职的5名员工</h1><pre><code>select ename,hiredate from emp order by hiredate desc limit 5;</code></pre><p>+——–+————+<br>| ename  | hiredate   |<br>+——–+————+<br>| ADAMS  | 1987-05-23 |<br>| SCOTT  | 1987-04-19 |<br>| MILLER | 1982-01-23 |<br>| JAMES  | 1981-12-03 |<br>| FORD   | 1981-12-03 |<br>+——–+————+</p>
<h1 id="12、取得每个薪水等级有多少员工"><a href="#12、取得每个薪水等级有多少员工" class="headerlink" title="12、取得每个薪水等级有多少员工"></a>12、取得每个薪水等级有多少员工</h1><p><em>第一步，找出每个员工的薪水等级</em></p>
<pre><code>select e.ename, s.grade from emp e join salgrade s on e.sal between losal and hisal;</code></pre><p>+——–+——-+<br>| ename  | grade |<br>+——–+——-+<br>| SMITH  |     1 |<br>| ALLEN  |     3 |<br>| WARD   |     2 |<br>| JONES  |     4 |<br>| MARTIN |     2 |<br>| BLAKE  |     4 |<br>| CLARK  |     4 |<br>| SCOTT  |     4 |<br>| KING   |     5 |<br>| TURNER |     3 |<br>| ADAMS  |     1 |<br>| JAMES  |     1 |<br>| FORD   |     4 |<br>| MILLER |     2 |<br>+——–+——-+</p>
<p><em>第二步：继续按照grade分组统计数量</em></p>
<pre><code>select count(*), s.grade from emp e join salgrade s on e.sal between losal and hisal group by s.grade;</code></pre><p>+———-+——-+<br>| count(*) | grade |<br>+———-+——-+<br>|        3 |     1 |<br>|        3 |     2 |<br>|        2 |     3 |<br>|        5 |     4 |<br>|        1 |     5 |<br>+———-+——-+</p>
<h1 id="13、面试题"><a href="#13、面试题" class="headerlink" title="13、面试题"></a>13、面试题</h1><blockquote>
<p><strong>有3给表 S（学生表）,C（课程表），SC（学生选课表）S（SNO，SNAME）代号（学号，姓名）</strong><br><strong>C（CNO，CNAME，CTEACHER）代表（课号，课名，教师）</strong><br><strong>SC（SNO，CNO，SCGRADE）代表（学号，课号，成绩）</strong><br><strong>问题：</strong><br><em>1、找出没选过“黎明”老师的所有学生姓名。</em><br><em>2、列出2门以上（含两门）不及格学生姓名及平均成绩。</em><br><em>3、即学过1号课程又学过2号课所有学生的姓名。</em><br><strong>请用标准SQL语言写出答案，方言也行（请说明是使用说明方言）。</strong></p>
</blockquote>
<h1 id="14、列出所有员工及领导的姓名"><a href="#14、列出所有员工及领导的姓名" class="headerlink" title="14、列出所有员工及领导的姓名"></a>14、列出所有员工及领导的姓名</h1><pre><code>select a.ename 员工, b.ename 领导 from emp a left join emp b on a.mgr = b.empno;</code></pre><p>+——–+——-+<br>| 员工   | 领导  |<br>+——–+——-+<br>| SMITH  | FORD  |<br>| ALLEN  | BLAKE |<br>| WARD   | BLAKE |<br>| JONES  | KING  |<br>| MARTIN | BLAKE |<br>| BLAKE  | KING  |<br>| CLARK  | KING  |<br>| SCOTT  | JONES |<br>| KING   | NULL  |<br>| TURNER | BLAKE |<br>| ADAMS  | SCOTT |<br>| JAMES  | BLAKE |<br>| FORD   | JONES |<br>| MILLER | CLARK |<br>+——–+——-+</p>
<h1 id="15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称"><a href="#15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称" class="headerlink" title="15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称"></a>15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称</h1><p><em>第一步，求出员工与其上级员工</em></p>
<pre><code>select a.ename,b.ename from emp a join emp b on a.mgr = b.empno;</code></pre><p>+——–+——-+<br>| ename  | ename |<br>+——–+——-+<br>| SMITH  | FORD  |<br>| ALLEN  | BLAKE |<br>| WARD   | BLAKE |<br>| JONES  | KING  |<br>| MARTIN | BLAKE |<br>| BLAKE  | KING  |<br>| CLARK  | KING  |<br>| SCOTT  | JONES |<br>| TURNER | BLAKE |<br>| ADAMS  | SCOTT |<br>| JAMES  | BLAKE |<br>| FORD   | JONES |<br>| MILLER | CLARK |<br>+——–+——-+</p>
<p><em>第二步，对比a,b两个表hiredate的大小，找出受雇日期早于其领导的人员</em></p>
<pre><code>select a.ename from emp a join emp b on a.mgr = b.empno where a.hiredate&lt;b.hiredate;</code></pre><p>+——-+<br>| ename |<br>+——-+<br>| SMITH |<br>| ALLEN |<br>| WARD  |<br>| JONES |<br>| BLAKE |<br>| CLARK |<br>+——-+</p>
<p><em>第三步，利用自连接dept进行输出dname</em></p>
<pre><code>select a.ename,a.empno,d.dname from emp a join emp b on a.mgr = b.empno join dept d on a.deptno = d.deptno where a.hiredate&lt;b.hiredate;</code></pre><p>+——-+——-+————+<br>| ename | empno | dname      |<br>+——-+——-+————+<br>| SMITH |  7369 | RESEARCH   |<br>| ALLEN |  7499 | SALES      |<br>| WARD  |  7521 | SALES      |<br>| JONES |  7566 | RESEARCH   |<br>| BLAKE |  7698 | SALES      |<br>| CLARK |  7782 | ACCOUNTING |<br>+——-+——-+————+</p>
<h1 id="16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门"><a href="#16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门" class="headerlink" title="16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门"></a>16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门</h1><pre><code>select d.dname, e.* from emp e right join dept d on e.deptno = d.deptno;</code></pre><p>+————+——-+——–+———–+——+————+———+———+——–+<br>| dname      | EMPNO | ENAME  | JOB       | MGR  | HIREDATE   | SAL     | COMM    | DEPTNO |<br>+————+——-+——–+———–+——+————+———+———+——–+<br>| RESEARCH   |  7369 | SMITH  | CLERK     | 7902 | 1980-12-17 |  800.00 |    NULL |     20 |<br>| SALES      |  7499 | ALLEN  | SALESMAN  | 7698 | 1981-02-20 | 1600.00 |  300.00 |     30 |<br>| SALES      |  7521 | WARD   | SALESMAN  | 7698 | 1981-02-22 | 1250.00 |  500.00 |     30 |<br>| RESEARCH   |  7566 | JONES  | MANAGER   | 7839 | 1981-04-02 | 2975.00 |    NULL |     20 |<br>| SALES      |  7654 | MARTIN | SALESMAN  | 7698 | 1981-09-28 | 1250.00 | 1400.00 |     30 |<br>| SALES      |  7698 | BLAKE  | MANAGER   | 7839 | 1981-05-01 | 2850.00 |    NULL |     30 |<br>| ACCOUNTING |  7782 | CLARK  | MANAGER   | 7839 | 1981-06-09 | 2450.00 |    NULL |     10 |<br>| RESEARCH   |  7788 | SCOTT  | ANALYST   | 7566 | 1987-04-19 | 3000.00 |    NULL |     20 |<br>| ACCOUNTING |  7839 | KING   | PRESIDENT | NULL | 1981-11-17 | 5000.00 |    NULL |     10 |<br>| SALES      |  7844 | TURNER | SALESMAN  | 7698 | 1981-09-08 | 1500.00 |    0.00 |     30 |<br>| RESEARCH   |  7876 | ADAMS  | CLERK     | 7788 | 1987-05-23 | 1100.00 |    NULL |     20 |<br>| SALES      |  7900 | JAMES  | CLERK     | 7698 | 1981-12-03 |  950.00 |    NULL |     30 |<br>| RESEARCH   |  7902 | FORD   | ANALYST   | 7566 | 1981-12-03 | 3000.00 |    NULL |     20 |<br>| ACCOUNTING |  7934 | MILLER | CLERK     | 7782 | 1982-01-23 | 1300.00 |    NULL |     10 |<br>| OPERATIONS |  NULL | NULL   | NULL      | NULL | NULL       |    NULL |    NULL |   NULL |<br>+————+——-+——–+———–+——+————+———+———+——–+</p>
<h1 id="17、列出至少有5给员工的所有部门"><a href="#17、列出至少有5给员工的所有部门" class="headerlink" title="17、列出至少有5给员工的所有部门"></a>17、列出至少有5给员工的所有部门</h1><pre><code>mysql&gt; select count(*),d.dname from emp e join dept d on e.deptno = d.deptno group by d.dname having count(*)&gt;=5;</code></pre><p>+———-+———-+<br>| count(*) | dname    |<br>+———-+———-+<br>|        5 | RESEARCH |<br>|        6 | SALES    |<br>+———-+———-+</p>
<h1 id="18、列出薪金比“SMITH”多的所有员工信息"><a href="#18、列出薪金比“SMITH”多的所有员工信息" class="headerlink" title="18、列出薪金比“SMITH”多的所有员工信息"></a>18、列出薪金比“SMITH”多的所有员工信息</h1><pre><code>select * from emp where sal&gt;(select sal from emp where ename=&apos;smith&apos;);</code></pre><p>+——-+——–+———–+——+————+———+———+——–+<br>| EMPNO | ENAME  | JOB       | MGR  | HIREDATE   | SAL     | COMM    | DEPTNO |<br>+——-+——–+———–+——+————+———+———+——–+<br>|  7499 | ALLEN  | SALESMAN  | 7698 | 1981-02-20 | 1600.00 |  300.00 |     30 |<br>|  7521 | WARD   | SALESMAN  | 7698 | 1981-02-22 | 1250.00 |  500.00 |     30 |<br>|  7566 | JONES  | MANAGER   | 7839 | 1981-04-02 | 2975.00 |    NULL |     20 |<br>|  7654 | MARTIN | SALESMAN  | 7698 | 1981-09-28 | 1250.00 | 1400.00 |     30 |<br>|  7698 | BLAKE  | MANAGER   | 7839 | 1981-05-01 | 2850.00 |    NULL |     30 |<br>|  7782 | CLARK  | MANAGER   | 7839 | 1981-06-09 | 2450.00 |    NULL |     10 |<br>|  7788 | SCOTT  | ANALYST   | 7566 | 1987-04-19 | 3000.00 |    NULL |     20 |<br>|  7839 | KING   | PRESIDENT | NULL | 1981-11-17 | 5000.00 |    NULL |     10 |<br>|  7844 | TURNER | SALESMAN  | 7698 | 1981-09-08 | 1500.00 |    0.00 |     30 |<br>|  7876 | ADAMS  | CLERK     | 7788 | 1987-05-23 | 1100.00 |    NULL |     20 |<br>|  7900 | JAMES  | CLERK     | 7698 | 1981-12-03 |  950.00 |    NULL |     30 |<br>|  7902 | FORD   | ANALYST   | 7566 | 1981-12-03 | 3000.00 |    NULL |     20 |<br>|  7934 | MILLER | CLERK     | 7782 | 1982-01-23 | 1300.00 |    NULL |     10 |<br>+——-+——–+———–+——+————+———+———+——–+</p>
<h1 id="19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。"><a href="#19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。" class="headerlink" title="19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。"></a>19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。</h1><p><em>第一步，列出所有“CLERK”的人员</em></p>
<pre><code>select e.ename,e.job,d.dname from emp e join dept d on d.deptno = e.deptno where e.job=&apos;CLERK&apos;;</code></pre><p>+——–+——-+————+<br>| ename  | job   | dname      |<br>+——–+——-+————+<br>| SMITH  | CLERK | RESEARCH   |<br>| ADAMS  | CLERK | RESEARCH   |<br>| JAMES  | CLERK | SALES      |<br>| MILLER | CLERK | ACCOUNTING |<br>+——–+——-+————+</p>
<p><em>第二步，找出每个部门的部门人数作为t2表，上表作为t1表进行内连接</em></p>
<pre><code>select count(*), d.dname from emp e join dept d on e.deptno = d.deptno group by d.dname;</code></pre><p>+———-+————+<br>| count(*) | dname      |<br>+———-+————+<br>|        3 | ACCOUNTING |<br>|        5 | RESEARCH   |<br>|        6 | SALES      |<br>+———-+————+</p>
<p><em>第三步，自连接t1和t2表</em></p>
<pre><code>select t1.ename,t1.dname,t2.count from (select e.ename,e.job,d.dname from emp e join dept d on d.deptno = e.deptno where e.job=&apos;CLERK&apos;) t1 join (select count(*) count, d.dname from emp e join dept d on e.deptno = d.deptno group by d.dname) t2 on t1.dname = t2.dname;</code></pre><p>+——–+————+——-+<br>| ename  | dname      | count |<br>+——–+————+——-+<br>| SMITH  | RESEARCH   |     5 |<br>| ADAMS  | RESEARCH   |     5 |<br>| JAMES  | SALES      |     6 |<br>| MILLER | ACCOUNTING |     3 |<br>+——–+————+——-+</p>
<h1 id="20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。"><a href="#20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。" class="headerlink" title="20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。"></a>20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。</h1><p><em>按照工作岗位分组求最小值。</em></p>
<pre><code>select job, count(*) from emp group by job having min(sal)&gt;1500;</code></pre><p>+———–+———-+<br>| job       | count(*) |<br>+———–+———-+<br>| ANALYST   |        2 |<br>| MANAGER   |        3 |<br>| PRESIDENT |        1 |<br>+———–+———-+</p>
<h1 id="21、列出在部门“SALES”-销售部-工作的员工的姓名，假定不知道销售部的部门编号。"><a href="#21、列出在部门“SALES”-销售部-工作的员工的姓名，假定不知道销售部的部门编号。" class="headerlink" title="21、列出在部门“SALES”(销售部)工作的员工的姓名，假定不知道销售部的部门编号。"></a>21、列出在部门“SALES”(销售部)工作的员工的姓名，假定不知道销售部的部门编号。</h1><pre><code>select deptno from dept where dname=&apos;SALES&apos;;</code></pre><p>+——–+<br>| deptno |<br>+——–+<br>|     30 |<br>+——–+<br>        select ename from emp where deptno =(select deptno from dept where dname=’SALES’);<br>+——–+<br>| ename  |<br>+——–+<br>| ALLEN  |<br>| WARD   |<br>| MARTIN |<br>| BLAKE  |<br>| TURNER |<br>| JAMES  |<br>+——–+</p>
<h1 id="22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。"><a href="#22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。" class="headerlink" title="22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。"></a>22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。</h1><p><em>第一步，列出薪金高于公司平均薪资的所有员工</em></p>
<pre><code>select e.* from emp e where sal&gt;(select avg(sal) avgsal from emp);</code></pre><p>+——-+——-+———–+——+————+———+——+——–+<br>| EMPNO | ENAME | JOB       | MGR  | HIREDATE   | SAL     | COMM | DEPTNO |<br>+——-+——-+———–+——+————+———+——+——–+<br>|  7566 | JONES | MANAGER   | 7839 | 1981-04-02 | 2975.00 | NULL |     20 |<br>|  7698 | BLAKE | MANAGER   | 7839 | 1981-05-01 | 2850.00 | NULL |     30 |<br>|  7782 | CLARK | MANAGER   | 7839 | 1981-06-09 | 2450.00 | NULL |     10 |<br>|  7788 | SCOTT | ANALYST   | 7566 | 1987-04-19 | 3000.00 | NULL |     20 |<br>|  7839 | KING  | PRESIDENT | NULL | 1981-11-17 | 5000.00 | NULL |     10 |<br>|  7902 | FORD  | ANALYST   | 7566 | 1981-12-03 | 3000.00 | NULL |     20 |<br>+——-+——-+———–+——+————+———+——+——–+</p>
<p><em>第二步，列出所在部门，上级领导，薪资等级</em></p>
<pre><code>select d.dname 部门,t2.ename 上级领导, t1.ename 员工姓名,s.grade from (select e.* from emp e where sal&gt;(select avg(sal) avgsal from emp)) t1 left join dept d on t1.deptno = d.deptno left join (select e.* from emp e where sal&gt;(select avg(sal) avgsal from emp)) t2 on t1.mgr=t2.empno left join salgrade s on t1.sal between losal and hisal;</code></pre><p>+————+———-+———-+——-+<br>| 部门       | 上级领导 | 员工姓名 | grade |<br>+————+———-+———-+——-+<br>| ACCOUNTING | KING     | CLARK    |     4 |<br>| RESEARCH   | KING     | JONES    |     4 |<br>| RESEARCH   | JONES    | SCOTT    |     4 |<br>| RESEARCH   | JONES    | FORD     |     4 |<br>| SALES      | KING     | BLAKE    |     4 |<br>| ACCOUNTING | NULL     | KING     |     5 |<br>+————+———-+———-+——-+</p>
<h1 id="23、列出各个部门的MANAGER（领导）最低薪金"><a href="#23、列出各个部门的MANAGER（领导）最低薪金" class="headerlink" title="23、列出各个部门的MANAGER（领导）最低薪金"></a>23、列出各个部门的MANAGER（领导）最低薪金</h1><pre><code>select min(sal),deptno from emp where job=&apos;MANAGER&apos; group by deptno;</code></pre><p>+———-+——–+<br>| min(sal) | deptno |<br>+———-+——–+<br>|  2450.00 |     10 |<br>|  2975.00 |     20 |<br>|  2850.00 |     30 |<br>+———-+——–+</p>
<h1 id="24、列出所有员工的年工资，按年薪从低到高排序"><a href="#24、列出所有员工的年工资，按年薪从低到高排序" class="headerlink" title="24、列出所有员工的年工资，按年薪从低到高排序"></a>24、列出所有员工的年工资，按年薪从低到高排序</h1><pre><code>select ename, (sal+ifnull(comm,0))*12 yearsal from emp order by yearsal;</code></pre><p>+——–+———-+<br>| ename  | yearsal  |<br>+——–+———-+<br>| SMITH  |  9600.00 |<br>| JAMES  | 11400.00 |<br>| ADAMS  | 13200.00 |<br>| MILLER | 15600.00 |<br>| TURNER | 18000.00 |<br>| WARD   | 21000.00 |<br>| ALLEN  | 22800.00 |<br>| CLARK  | 29400.00 |<br>| MARTIN | 31800.00 |<br>| BLAKE  | 34200.00 |<br>| JONES  | 35700.00 |<br>| SCOTT  | 36000.00 |<br>| FORD   | 36000.00 |<br>| KING   | 60000.00 |<br>+——–+———-+</p>
<h1 id="25、求出员工领导的薪水超过3000的员工名称与领导名称"><a href="#25、求出员工领导的薪水超过3000的员工名称与领导名称" class="headerlink" title="25、求出员工领导的薪水超过3000的员工名称与领导名称"></a>25、求出员工领导的薪水超过3000的员工名称与领导名称</h1><pre><code>select a.ename, b.ename from emp a join emp b on a.mgr = b.empno where b.sal&gt;3000;</code></pre><p>+——-+——-+<br>| ename | ename |<br>+——-+——-+<br>| JONES | KING  |<br>| BLAKE | KING  |<br>| CLARK | KING  |<br>+——-+——-+</p>
<h1 id="26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数"><a href="#26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数" class="headerlink" title="26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数"></a>26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数</h1><pre><code>select d.dname, ifnull(sum(e.sal),&apos; &apos;),count(e.ename) from emp e right join (select * from dept where dname like &apos;%s%&apos;) d on e.deptno = d.deptno group by d.dname;</code></pre><p>+————+————————+—————-+<br>| DNAME      | ifnull(sum(e.sal),’ ‘) | count(e.ename) |<br>+————+————————+—————-+<br>| OPERATIONS |                        |              0 |<br>| RESEARCH   | 10875.00               |              5 |<br>| SALES      | 9400.00                |              6 |<br>+————+————————+—————-+</p>
<h1 id="27、给任职日期超过30年的员工加薪10"><a href="#27、给任职日期超过30年的员工加薪10" class="headerlink" title="27、给任职日期超过30年的员工加薪10%"></a>27、给任职日期超过30年的员工加薪10%</h1><pre><code>update emp set sal = sal * 1.1 where timestampdiff(year,hiredate,now());</code></pre><p>Query OK, 14 rows affected (0.02 sec)<br>Rows matched: 14  Changed: 14  Warnings: 0</p>


        

      
    </div>

      <!-- 相关文章推荐 -->
     
          


     

    
    
    

    <div>
          
            
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/">MYSQL——27道练习题</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 孤桜懶契 的个人博客">孤桜懶契</a></p>
  <p><span>发布时间:</span>2020年10月15日 - 05:46:24</p>
  <p><span>最后更新:</span>2020年10月21日 - 21:09:37</p>
  <p><span>原始链接:</span><a href="/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/" title="MYSQL——27道练习题">https://gylq.gitee.io/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://gylq.gitee.io/2020/10/15/MYSQL%E2%80%94%E2%80%9427%E9%81%93%E7%BB%83%E4%B9%A0%E9%A2%98/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>
</div>
<script>
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({
          title: "",
          text: '复制成功',
          icon: "success",
          showConfirmButton: true
          });
    });
    });
</script>


          
    </div>

    

    <div>
      
        <div>
    
        <div class="read-over">-------------------本文结束 <i class="fa fa-paw"></i> 感谢您的阅读-------------------</div>
    
</div>

      
    </div>

    
      <div>
        <div class="share_reward">
  <div>坚持原创技术分享，感谢您的支持和鼓励！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="孤桜懶契 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="孤桜懶契 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/%E7%9F%A5%E8%AF%86%E6%8B%93%E5%B1%95/" rel="tag"> <i class="fa fa-tag"></i> 知识拓展</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2020/10/26/Monster%E7%9A%84%E5%8F%A3%E8%AF%AD%E6%96%B9%E6%B3%95/" rel="prev" title="Monster的口语方法">
                <i class="fa fa-chevron-left"></i> Monster的口语方法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2020/10/12/MYSQL%E8%A1%A8%E7%9A%84%E4%BD%BF%E7%94%A8/" rel="next" title="MYSQL表的使用">
                MYSQL表的使用 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
         <div
  data-weibo-title="分享到微博"
  data-qq-title="分享到QQ"
  data-douban-title="分享到豆瓣"
  class="social-share"
  class="share-component"



  data-disabled="qzone,google+,linkedin"
  data-description="Share.js - 一键分享到微博，QQ空间，腾讯微博，人人，豆瓣...">
   分享到：
</div>


      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  





        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <a href="/">
              <img class="site-author-image" itemprop="image"
                src="/images/qq.png"
                alt="孤桜懶契" />
              </a>
            
              <p class="site-author-name" itemprop="name">孤桜懶契</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">88</span>
                  <span class="site-state-item-name">文章</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">19</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">62</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
              <!-- 为Hexo Next主题添加哈林摇特效  -->
              <a title="收藏到书签，偶尔High一下^_^" rel="alternate" class="mw-harlem_shake_slow wobble shake" href="javascript:void(0)" onclick="javascript:(function go() {function c() {var e = document.createElement('link');e.setAttribute('type', 'text/css');e.setAttribute('rel', 'stylesheet');e.setAttribute('href', f);e.setAttribute('class', l);document.body.appendChild(e)}function h(){var e = document.getElementsByClassName(l);for(var t = 0; t< e.length; t++){document.body.removeChild(e[t])}}function p(){var e = document.createElement('div');e.setAttribute('class', a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s = d(i);return s.height>e &amp;&amp;s.height<n &amp;&amp; s.width>t &amp;&amp;s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e &amp;&amp; !isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function E(e){var t=m(e);return t>=w &amp;&amp; t<=b+w}var songs=['https://www.liaofuzhan.com/music/无尽光芒.mp3'];function S(){var e=document.getElementById('audio_element_id');if(e!=null){var index=parseInt(e.getAttribute('curSongIndex'));if(index>songs.length-2){index=0;}else{index++;}e.setAttribute('curSongIndex',index);N();}e.src=i;e.play()}function x(e){e.className+=' '+s+' '+o}function T(e){e.className+=' '+s+' '+u[Math.floor(Math.random()*u.length)]}function N(){var e=document.getElementsByClassName(s);var t=new RegExp('\\b'+s+'\\b');for(var n=0;n<e.length;){e[n].className=e[n].className.replace(t,'')}}function initAudioEle(){var e=document.getElementById('audio_element_id');if(e===null){e=document.createElement('audio');e.setAttribute('class',l);e.setAttribute('curSongIndex',0);e.id='audio_element_id';e.loop=false;e.bgcolor=0;e.addEventListener('canplay',function(){setTimeout(function(){x(k)},500);setTimeout(function(){N();p();for(var e=0;e<O.length;e++){T(O[e])}},15500)},true);e.addEventListener('ended',function(){N();h();go();},true);e.innerHTML='<p>If you are reading this,it is because your browser does not support the audio element. We recommend that you get a new browser.</p><p>';document.body.appendChild(e);}}initAudioEle();var e=30;var t=30;var n=350;var r=350;var curSongIndex=parseInt(document.getElementById('audio_element_id').getAttribute('curSongIndex'));var i=songs[curSongIndex];var s='mw-harlem_shake_me';var o='im_first';var u=['im_drunk','im_baked','im_trippin','im_blown'];var a='mw-strobe_light';var f='https://s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css';var l='mw_added_css';var b=g();var w=y();var C=document.getElementsByTagName('*');var k=null;for(var L=0;L<C.length;L++){var A=C[L];if(v(A)){if(E(A)){k=A;break}}}if(A===null){console.warn('Could not find a node of the right size. Please try a different page.');return}c();S();var O=[];for(var L=0;L<C.length;L++){var A=C[L];if(v(A)){O.push(A)}}})()"><i class="fa fa-music"></i> High~</a>

            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="https://github.com/GYLQ/GYLQ.github.io" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="mailto:2324298829@qq.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="https://weibo.com/u/5828235984?refer_flag=1005055010_" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="https://www.ximalaya.com/zhubo/146380077" target="_blank" title="喜马拉雅">
                      
                        <i class="fa fa-fw fa-twitter"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="https://space.bilibili.com/13563835" target="_blank" title="哔哩哔哩">
                      
                        <i class="fa fa-fw fa-apple"></i></a>
                  </span>
                
            </div>
          

            <!--
            <div id="music163player">
                <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1336790004&auto=1&height=66"></iframe>
            </div>
            -->

          
          

          
          

          <!--近期文章版块 began-->
          
              <div class="links-of-blogroll motion-element links-of-blogroll-block">
                <div class="links-of-blogroll-title">
                  <i class="fa fa-history fa-" aria-hidden="true"></i>
                  近期文章
                </div>
                <ul class="links-of-blogroll-list">
                  
                  
                    <li class='my-links-of-blogroll-li'>
                      <a href="/2021/07/19/%E3%80%90GITHUB%E3%80%91Github%E4%B8%8A%E4%BC%A0%E6%9C%AC%E5%9C%B0%E9%A1%B9%E7%9B%AE/" title="【GITHUB】Github上传本地项目" target="_blank">【GITHUB】Github上传本地项目</a>
                    </li>
                  
                    <li class='my-links-of-blogroll-li'>
                      <a href="/2021/07/18/%E3%80%90PHP%E3%80%91%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%E6%95%B4%E7%90%86/" title="【PHP】基础知识整理" target="_blank">【PHP】基础知识整理</a>
                    </li>
                  
                    <li class='my-links-of-blogroll-li'>
                      <a href="/2021/07/13/%E3%80%90ctfshow%E3%80%91web%E7%AF%87wp%E8%AE%B0%E5%BD%95%EF%BC%88%E6%8C%81%E7%BB%AD%E6%9B%B4%E6%96%B0%EF%BC%89/" title="【ctfshow】web篇wp记录（持续更新）" target="_blank">【ctfshow】web篇wp记录（持续更新）</a>
                    </li>
                  
                    <li class='my-links-of-blogroll-li'>
                      <a href="/2021/07/13/%E3%80%90HTML%E3%80%91%E5%AE%9E%E6%88%98%E9%98%BF%E9%87%8C%E4%BA%91src%E9%A1%B5%E9%9D%A2css%E6%A8%A1%E4%BB%BF%E5%9F%BA%E7%A1%80%E5%AD%A6%E4%B9%A0/" title="【HTML】实战阿里云src页面css模仿基础学习" target="_blank">【HTML】实战阿里云src页面css模仿基础学习</a>
                    </li>
                  
                    <li class='my-links-of-blogroll-li'>
                      <a href="/2021/07/09/%E3%80%90HTML%E3%80%91CSS%E5%9F%BA%E7%A1%80%E5%AD%A6%E4%B9%A0%E4%B9%8Bfloat%E6%B5%AE%E5%8A%A8%E5%9D%97%E7%BA%A7%E5%85%83%E7%B4%A0%E8%A1%8C%E5%86%85%E5%85%83%E7%B4%A0/" title="【HTML】CSS基础学习之float浮动块级元素行内元素" target="_blank">【HTML】CSS基础学习之float浮动块级元素行内元素</a>
                    </li>
                  
                </ul>
              </div>
          
          <!--近期文章版块 end-->

          
              <!-- canvas粒子时钟 -->
              <!-- canvas粒子时钟 https://www.cnblogs.com/xiaohuochai/p/6368039.html
  https://www.html5tricks.com/html5-canvas-dance-time.html
 -->
<div id="">
  <canvas id="canvas" style="width:60%;">
</div>
<script async>
(function(){
  var WINDOW_WIDTH = 820;
  		var WINDOW_HEIGHT = 250;
  		var RADIUS = 7; //球半径
  		var NUMBER_GAP = 10; //数字之间的间隙
  		var u=0.65; //碰撞能量损耗系数
  		var context; //Canvas绘制上下文
  		var balls = []; //存储彩色的小球
  		const colors = ["#33B5E5","#0099CC","#AA66CC","#9933CC","#99CC00","#669900","#FFBB33","#FF8800","#FF4444","#CC0000"]; //彩色小球的颜色
  		var currentNums = []; //屏幕显示的8个字符
  		var digit =
                  [
                      [
                          [0,0,1,1,1,0,0],
                          [0,1,1,0,1,1,0],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,0,1,1,0],
                          [0,0,1,1,1,0,0]
                      ],//0
                      [
                          [0,0,0,1,1,0,0],
                          [0,1,1,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [1,1,1,1,1,1,1]
                      ],//1
                      [
                          [0,1,1,1,1,1,0],
                          [1,1,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,0,0],
                          [0,0,1,1,0,0,0],
                          [0,1,1,0,0,0,0],
                          [1,1,0,0,0,0,0],
                          [1,1,0,0,0,1,1],
                          [1,1,1,1,1,1,1]
                      ],//2
                      [
                          [1,1,1,1,1,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,0,0],
                          [0,0,1,1,1,0,0],
                          [0,0,0,0,1,1,0],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,1,1,0]
                      ],//3
                      [
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,1,0],
                          [0,0,1,1,1,1,0],
                          [0,1,1,0,1,1,0],
                          [1,1,0,0,1,1,0],
                          [1,1,1,1,1,1,1],
                          [0,0,0,0,1,1,0],
                          [0,0,0,0,1,1,0],
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,1,1]
                      ],//4
                      [
                          [1,1,1,1,1,1,1],
                          [1,1,0,0,0,0,0],
                          [1,1,0,0,0,0,0],
                          [1,1,1,1,1,1,0],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,1,1,0]
                      ],//5
                      [
                          [0,0,0,0,1,1,0],
                          [0,0,1,1,0,0,0],
                          [0,1,1,0,0,0,0],
                          [1,1,0,0,0,0,0],
                          [1,1,0,1,1,1,0],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,1,1,0]
                      ],//6
                      [
                          [1,1,1,1,1,1,1],
                          [1,1,0,0,0,1,1],
                          [0,0,0,0,1,1,0],
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,0,0],
                          [0,0,0,1,1,0,0],
                          [0,0,1,1,0,0,0],
                          [0,0,1,1,0,0,0],
                          [0,0,1,1,0,0,0],
                          [0,0,1,1,0,0,0]
                      ],//7
                      [
                          [0,1,1,1,1,1,0],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,1,1,0],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,1,1,0]
                      ],//8
                      [
                          [0,1,1,1,1,1,0],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [1,1,0,0,0,1,1],
                          [0,1,1,1,0,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,0,1,1],
                          [0,0,0,0,1,1,0],
                          [0,0,0,1,1,0,0],
                          [0,1,1,0,0,0,0]
                      ],//9
                      [
                          [0,0,0,0],
                          [0,0,0,0],
                          [0,1,1,0],
                          [0,1,1,0],
                          [0,0,0,0],
                          [0,0,0,0],
                          [0,1,1,0],
                          [0,1,1,0],
                          [0,0,0,0],
                          [0,0,0,0]
                      ]//:
                  ];

  		function drawDatetime(cxt){
  			var nums = [];

  			context.fillStyle="#005eac"
  			var date = new Date();
  			var offsetX = 70, offsetY = 30;
  			var hours = date.getHours();
  			var num1 = Math.floor(hours/10);
  			var num2 = hours%10;
  			nums.push({num: num1});
  			nums.push({num: num2});
  			nums.push({num: 10}); //冒号
  			var minutes = date.getMinutes();
  			var num1 = Math.floor(minutes/10);
  			var num2 = minutes%10;
  			nums.push({num: num1});
  			nums.push({num: num2});
  			nums.push({num: 10}); //冒号
  			var seconds = date.getSeconds();
  			var num1 = Math.floor(seconds/10);
  			var num2 = seconds%10;
  			nums.push({num: num1});
  			nums.push({num: num2});

  			for(var x = 0;x<nums.length;x++){
  				nums[x].offsetX = offsetX;
  				offsetX = drawSingleNumber(offsetX,offsetY, nums[x].num,cxt);
  				//两个数字连一块，应该间隔一些距离
  				if(x<nums.length-1){
  					if((nums[x].num!=10) &&(nums[x+1].num!=10)){
  						offsetX+=NUMBER_GAP;
  					}
  				}
  			}

  			//说明这是初始化
  			if(currentNums.length ==0){
  				currentNums = nums;
  			}else{
  				//进行比较
  				for(var index = 0;index<currentNums.length;index++){
  					if(currentNums[index].num!=nums[index].num){
  						//不一样时，添加彩色小球
  						addBalls(nums[index]);
  						currentNums[index].num=nums[index].num;
  					}
  				}
  			}
  			renderBalls(cxt);
  			updateBalls();

  			return date;
  		}

  		function addBalls (item) {
  			var num = item.num;
  			var numMatrix = digit[num];
  			for(var y = 0;y<numMatrix.length;y++){
  				for(var x = 0;x<numMatrix[y].length;x++){
  					if(numMatrix[y][x]==1){
  						var ball={
  							offsetX:item.offsetX+RADIUS+RADIUS*2*x,
  							offsetY:30+RADIUS+RADIUS*2*y,
  							color:colors[Math.floor(Math.random()*colors.length)],
  							g:1.5+Math.random(),
  							vx:Math.pow(-1, Math.ceil(Math.random()*10))*4+Math.random(),
  							vy:-5
  						}
  						balls.push(ball);
  					}
  				}
  			}
  		}

  		function renderBalls(cxt){
  			for(var index = 0;index<balls.length;index++){
  				cxt.beginPath();
  				cxt.fillStyle=balls[index].color;
  				cxt.arc(balls[index].offsetX, balls[index].offsetY, RADIUS, 0, 2*Math.PI);
  				cxt.fill();
  			}
  		}

  		function updateBalls () {
  			var i =0;
  			for(var index = 0;index<balls.length;index++){
  				var ball = balls[index];
  				ball.offsetX += ball.vx;
  				ball.offsetY += ball.vy;
  				ball.vy+=ball.g;
  				if(ball.offsetY > (WINDOW_HEIGHT-RADIUS)){
  					ball.offsetY= WINDOW_HEIGHT-RADIUS;
  					ball.vy=-ball.vy*u;
  				}
  				if(ball.offsetX>RADIUS&&ball.offsetX<(WINDOW_WIDTH-RADIUS)){

  					balls[i]=balls[index];
  					i++;
  				}
  			}
  			//去除出边界的球
  			for(;i<balls.length;i++){
  				balls.pop();
  			}
  		}
  		function drawSingleNumber(offsetX, offsetY, num, cxt){
  			var numMatrix = digit[num];
  			for(var y = 0;y<numMatrix.length;y++){
  				for(var x = 0;x<numMatrix[y].length;x++){
  					if(numMatrix[y][x]==1){
  						cxt.beginPath();
  						cxt.arc(offsetX+RADIUS+RADIUS*2*x,offsetY+RADIUS+RADIUS*2*y,RADIUS,0,2*Math.PI);
  						cxt.fill();
  					}
  				}
  			}
  			cxt.beginPath();
  			offsetX += numMatrix[0].length*RADIUS*2;
  			return offsetX;
  		}

  		var canvas = document.getElementById("canvas");
  		canvas.width=WINDOW_WIDTH;
  		canvas.height=WINDOW_HEIGHT;
  		context = canvas.getContext("2d");

  		//记录当前绘制的时刻
  		var currentDate = new Date();

  		setInterval(function(){
  			//清空整个Canvas，重新绘制内容
  			context.clearRect(0, 0, context.canvas.width, context.canvas.height);
  			drawDatetime(context);
  		}, 50)
})();
</script>

          
          
              <!-- 网站运行时间 -->
              <div id="days"></div>

<script async language="javascript">

  function show_date_time(){
      window.setTimeout("show_date_time()", 1000);
  //    BirthDay=new Date("08/07/2019 20:00:00");
      BirthDay=new Date("07/02/2020 10:00:00");
      today=new Date();
      timeold=(today.getTime()-BirthDay.getTime());
      sectimeold=timeold/1000
      secondsold=Math.floor(sectimeold);
      msPerDay=24*60*60*1000
      e_daysold=timeold/msPerDay
      daysold=Math.floor(e_daysold);
      e_hrsold=(e_daysold-daysold)*24;
      hrsold=setzero(Math.floor(e_hrsold));
      e_minsold=(e_hrsold-hrsold)*60;
      minsold=setzero(Math.floor((e_hrsold-hrsold)*60));
      seconds=setzero(Math.floor((e_minsold-minsold)*60));
      document.getElementById('days').innerHTML="已运行"+daysold+"天"+hrsold+"时"+minsold+"分"+seconds+"秒";
  }

  function setzero(i){
      if (i<10)
      {i="0" + i};
      return i;
  }

  show_date_time();

</script>

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#1、取得每个部门最高薪水的人员名称"><span class="nav-number">1.</span> <span class="nav-text">1、取得每个部门最高薪水的人员名称</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#2、哪些人的薪水在部门的平均薪资之上"><span class="nav-number">2.</span> <span class="nav-text">2、哪些人的薪水在部门的平均薪资之上</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#3、取得部门中（所有人的）平均的薪资等级"><span class="nav-number">3.</span> <span class="nav-text">3、取得部门中（所有人的）平均的薪资等级</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#4、不准用组函数（MAX），取得最高薪水"><span class="nav-number">4.</span> <span class="nav-text">4、不准用组函数（MAX），取得最高薪水</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#5、取得平均薪水最高的部门的部门编号"><span class="nav-number">5.</span> <span class="nav-text">5、取得平均薪水最高的部门的部门编号</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#6、取得平均薪水最高的部门的部门名称"><span class="nav-number">6.</span> <span class="nav-text">6、取得平均薪水最高的部门的部门名称</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#7、求平均薪水的等级最低的部门的部门名称"><span class="nav-number">7.</span> <span class="nav-text">7、求平均薪水的等级最低的部门的部门名称</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名"><span class="nav-number">8.</span> <span class="nav-text">8、取得比普通员工（员工代码没有在mgr字段上出现的）的最高薪水还要高的领导人姓名</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#9、取得薪水最高的前五名员工"><span class="nav-number">9.</span> <span class="nav-text">9、取得薪水最高的前五名员工</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#10、取得薪水最高的第六到第十名员工"><span class="nav-number">10.</span> <span class="nav-text">10、取得薪水最高的第六到第十名员工</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#11、取得最后入职的5名员工"><span class="nav-number">11.</span> <span class="nav-text">11、取得最后入职的5名员工</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#12、取得每个薪水等级有多少员工"><span class="nav-number">12.</span> <span class="nav-text">12、取得每个薪水等级有多少员工</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#13、面试题"><span class="nav-number">13.</span> <span class="nav-text">13、面试题</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#14、列出所有员工及领导的姓名"><span class="nav-number">14.</span> <span class="nav-text">14、列出所有员工及领导的姓名</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称"><span class="nav-number">15.</span> <span class="nav-text">15、列出受雇日期早于其直接上级的所有员工的编号，姓名，部门名称</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门"><span class="nav-number">16.</span> <span class="nav-text">16、列出部门名称和这些部门的员工信息，同时列出那些没有员工的部门</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#17、列出至少有5给员工的所有部门"><span class="nav-number">17.</span> <span class="nav-text">17、列出至少有5给员工的所有部门</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#18、列出薪金比“SMITH”多的所有员工信息"><span class="nav-number">18.</span> <span class="nav-text">18、列出薪金比“SMITH”多的所有员工信息</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。"><span class="nav-number">19.</span> <span class="nav-text">19、列出所有“CLERK”（办事员）的姓名及其部门名称，部门的人数。</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。"><span class="nav-number">20.</span> <span class="nav-text">20、列出最低薪金大于1500的各种工作及从事此工作的全部雇员人数。</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#21、列出在部门“SALES”-销售部-工作的员工的姓名，假定不知道销售部的部门编号。"><span class="nav-number">21.</span> <span class="nav-text">21、列出在部门“SALES”(销售部)工作的员工的姓名，假定不知道销售部的部门编号。</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。"><span class="nav-number">22.</span> <span class="nav-text">22、列出薪金高于公司平均薪金的所有员工，所在部门，上级领导，雇员的工资等级。</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#23、列出各个部门的MANAGER（领导）最低薪金"><span class="nav-number">23.</span> <span class="nav-text">23、列出各个部门的MANAGER（领导）最低薪金</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#24、列出所有员工的年工资，按年薪从低到高排序"><span class="nav-number">24.</span> <span class="nav-text">24、列出所有员工的年工资，按年薪从低到高排序</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#25、求出员工领导的薪水超过3000的员工名称与领导名称"><span class="nav-number">25.</span> <span class="nav-text">25、求出员工领导的薪水超过3000的员工名称与领导名称</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数"><span class="nav-number">26.</span> <span class="nav-text">26、求出部门名称中，带‘S’字符的部门员工的工资合计、部门人数</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#27、给任职日期超过30年的员工加薪10"><span class="nav-number">27.</span> <span class="nav-text">27、给任职日期超过30年的员工加薪10%</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

      

      <!-- 标签云 -->
      <!--
      
      <script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
      <script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
      <div class="widget-wrap">
      <h3 class="widget-title">Tag Cloud</h3>
      <div id="myCanvasContainer" class="widget tagcloud">
          <canvas width="250" height="250" id="resCanvas" style="width=100%">
              <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/AWVS/" rel="tag">AWVS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CMS/" rel="tag">CMS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C%E8%AF%AD%E8%A8%80/" rel="tag">C语言</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Dns%E5%8A%AB%E6%8C%81/" rel="tag">Dns劫持</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Ettercap/" rel="tag">Ettercap</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Form/" rel="tag">Form</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Git/" rel="tag">Git</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Gitee%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2/" rel="tag">Gitee自动部署</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Google-hack%E8%AF%AD%E6%B3%95/" rel="tag">Google hack语法</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hashcat/" rel="tag">Hashcat</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JAVA/" rel="tag">JAVA</a><span class="tag-list-count">18</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LeetCode/" rel="tag">LeetCode</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Nmap/" rel="tag">Nmap</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SQL%E6%B3%A8%E5%85%A5/" rel="tag">SQL注入</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/aircrack/" rel="tag">aircrack</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/css/" rel="tag">css</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ctf/" rel="tag">ctf</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/html/" rel="tag">html</a><span class="tag-list-count">11</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/input/" rel="tag">input</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kali%E5%9F%BA%E7%A1%80/" rel="tag">kali基础</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/list%E7%9A%84%E4%BD%BF%E7%94%A8/" rel="tag">list的使用</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/msf/" rel="tag">msf</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/php/" rel="tag">php</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python%E8%84%9A%E6%9C%AC/" rel="tag">python脚本</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sqlmap/" rel="tag">sqlmap</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/web/" rel="tag">web</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/web%E5%AE%89%E5%85%A8/" rel="tag">web安全</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wireshark/" rel="tag">wireshark</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wp/" rel="tag">wp</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%BA%8C%E5%88%86%E6%90%9C%E7%B4%A2%E6%A0%91/" rel="tag">二分搜索树</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86/" rel="tag">信息收集</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%85%8D%E6%9D%80/" rel="tag">免杀</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" rel="tag">博客搭建</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%97%85%E6%8E%A2%E5%B7%A5%E5%85%B7/" rel="tag">嗅探工具</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%A0%86%E6%8E%92%E5%BA%8F/" rel="tag">堆排序</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AD%90%E5%9F%9F%E5%90%8D/" rel="tag">子域名</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95/" rel="tag">学习记录</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag">工具</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BD%92%E5%B9%B6%E6%8E%92%E5%BA%8F/" rel="tag">归并排序</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BD%95%E5%B1%8F/" rel="tag">录屏</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F/" rel="tag">快速排序</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%88%90%E9%95%BF%E4%B9%8B%E8%B7%AF/" rel="tag">成长之路</a><span class="tag-list-count">34</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%8C%87%E7%BA%B9%E8%AF%86%E5%88%AB/" rel="tag">指纹识别</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%8F%92%E5%85%A5%E6%8E%92%E5%BA%8F/" rel="tag">插入排序</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" rel="tag">数据结构</a><span class="tag-list-count">17</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%97%A0%E7%BA%BFwifi%E5%AF%86%E7%A0%81%E7%A0%B4%E8%A7%A3/" rel="tag">无线wifi密码破解</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%A0%87%E7%AD%BE%E7%9A%84%E4%BD%BF%E7%94%A8/" rel="tag">标签的使用</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95/" rel="tag">渗透测试</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95%E5%9F%BA%E7%A1%80/" rel="tag">渗透测试基础</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/" rel="tag">渗透测试工具</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%BC%8F%E6%B4%9E%E5%B7%A5%E5%85%B7/" rel="tag">漏洞工具</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%88%86%E7%A0%B4%E5%B7%A5%E5%85%B7/" rel="tag">爆破工具</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%89%88%E6%9C%AC%E5%85%B1%E5%AD%98/" rel="tag">版本共存</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%9F%A5%E8%AF%86%E6%8B%93%E5%B1%95/" rel="tag">知识拓展</a><span class="tag-list-count">11</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%BD%91%E7%BB%9C%E6%94%BB%E9%98%B2%E5%B7%A5%E5%85%B7/" rel="tag">网络攻防工具</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%8B%B1%E8%AF%AD%E5%9B%9B%E7%BA%A7/" rel="tag">英语四级</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%AE%AE%E8%AE%BA%E6%96%87%E4%B8%87%E8%83%BD%E6%A8%A1%E6%9D%BF/" rel="tag">议论文万能模板</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%B0%B7%E6%AD%8C%E8%AF%AD%E6%B3%95/" rel="tag">谷歌语法</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%80%89%E6%8B%A9%E6%8E%92%E5%BA%8F/" rel="tag">选择排序</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%93%BE%E8%A1%A8%E5%AE%9E%E7%8E%B0%E9%98%9F%E5%88%97/" rel="tag">链表实现队列</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%93%BE%E8%A1%A8%E7%9A%84%E5%A2%9E%E5%88%A0%E6%94%B9%E6%9F%A5/" rel="tag">链表的增删改查</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%95%9C%E5%A4%B4/" rel="tag">镜头</a><span class="tag-list-count">1</span></li></ul>
          </canvas>
      </div>
      </div>
      
      -->
      <!-- 标签云 -->

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; 2020 &mdash; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
       <i class="fa fa-heartbeat"></i>
  </span>
  <!--
    <span class="author" itemprop="copyrightHolder"> &nbsp;孤桜懶契</span>
  -->
  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
    <span title="Site words total count">132.8k</span>
  
</div>












  <div class="subscribe-box">

  </div>


        
<div class="busuanzi-count">
  <!--
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  -->
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

   

  
  
    
      <span class="site-uv">
        
        我的第 <span class="busuanzi-value" id="busuanzi_value_site_uv"></span> 位朋友，
      </span>
    

    
      <span class="site-pv">
        历经 <span class="busuanzi-value" id="busuanzi_value_site_pv"></span> 次回眸才与你相遇
        <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      </span>
    
  

</div>








        
      </div>
    </footer>

    
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  










  



  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/npm/jquery@2.1.3/dist/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/fastclick/1.0.6/fastclick.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazyload/1.9.3/jquery.lazyload.min.js"></script>
  

  
  
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/velocity-animate@1.2.1/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/npm/velocity-animate@1.2.1/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script id="ribbon" type="text/javascript" size="60" alpha="0.1"  zIndex="-1" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="/js/src/Valine.min.js"></script>

  <!-- https://deserts.io/diy-a-comment-system/ -->
  <script type="text/javascript">
    new Valine({
        lang: 'zh-cn',
        admin_email: 'xxxxxxxxx@qq.com', //博主邮箱
        el: '#comments' ,
        appId: 'HzU5gDhBUYHF8QTF8DmbGhjD-gzGzoHsz',
        appKey: 'wp1HNJ17SdpnE0wIFq99eTKH',
        emoticon_url: 'https://cdn.jsdelivr.net/gh/leafjame/cdn/emoji',
       // emoticon_list: ["吐.png","喷血.png","狂汗.png","不说话.png","汗.png","坐等.png","献花.png","不高兴.png","中刀.png","害羞.png","皱眉.png","小眼睛.png","中指.png","尴尬.png","瞅你.png","想一想.png","中枪.png","得意.png","肿包.png","扇耳光.png","亲亲.png","惊喜.png","脸红.png","无所谓.png","便便.png","愤怒.png","蜡烛.png","献黄瓜.png","内伤.png","投降.png","观察.png","看不见.png","击掌.png","抠鼻.png","邪恶.png","看热闹.png","口水.png","抽烟.png","锁眉.png","装大款.png","吐舌.png","无奈.png","长草.png","赞一个.png","呲牙.png","无语.png","阴暗.png","不出所料.png","咽气.png","期待.png","高兴.png","吐血倒地.png","哭泣.png","欢呼.png","黑线.png","喜极而泣.png","喷水.png","深思.png","鼓掌.png","暗地观察.png"],
        emoticon_list: ["大佬.gif","点赞.gif","尴尬.gif","鼓掌.gif","笑哭.gif","害羞.gif","黑人问号.gif","坏笑.gif","惊吓.gif","可爱.gif","抠鼻子.gif","流汗.gif","色.gif","吐血.gif","无奈.gif","huaji.png","liuhanhuaji.png","mojinghuaji.png","coshuaji.png","shounuehuaji.png","jizhi.png","doge.png","chigua.png","motion_1016.png","motion_1012.png","motion_1017.png","f_hufen.png","f_geili.png","f_jiong.png","f_meng.png","f_shenma.png","f_v5.png","c_onef.png","c_onem.png","c_fivem.png","c_oney.png","c_teny.png","c_oy.png","1f60a.png","1f60b.png","1f60d.png","1f60e.png","1f61a.png","1f62d.png","1f601.png","1f602.png","1f605.png","1f606.png","1f607.png","1f618.png","1f630.png","1f631.png","1f632.png","1f633.png","1f63e.png","1f63f.png","1f638.png","1f639.png","zhayanjian.gif","ciya.gif","xieyanxiao.gif","huaixiao.gif","xiaoku.gif","leiben.gif","penxue.gif","hanxiao.gif","baiyan.gif","cahan.gif","fadai.gif","haixiu.gif","haqian.gif","ku.gif","liuhan.gif","OK.gif","qiang.gif","woshou.gif","baoquan.gif","qiudale.gif","se.gif","yinxian.gif","yun.gif","zaijian.gif"],
        placeholder: '&#x270d;&nbsp;写评论',
  });

  <!--点击邮件中的链接跳转至相应评论-->
  if(window.location.hash){
      var checkExist = setInterval(function() {
         if ($(window.location.hash).length) {
            $('html, body').animate({scrollTop: $(window.location.hash).offset().top-90}, 1000);
            clearInterval(checkExist);
         }
      }, 100);
   }

  </script>






  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





    <script>  function addCount(Counter){var $visitors=$('.leancloud_visitors');var url=$visitors.attr('id').trim();var title=$visitors.attr('data-flag-title').trim();Counter('get','/classes/Counter',{where:JSON.stringify({url})}).done(function({results}){if(results.length>0){var counter=results[0]; var $element=$(document.getElementById(url));$element.find('.leancloud-visitors-count').text(counter.time+1);Counter('put','/classes/Counter/'+counter.objectId,JSON.stringify({time:{'__op':'Increment','amount':1}})) .fail(function({responseJSON}){console.log('Failed to save Visitor num, with error message: '+responseJSON.error);})}else{ Counter('post','/classes/Counter',JSON.stringify({title:title,url:url,time:1})).done(function(){var $element=$(document.getElementById(url));$element.find('.leancloud-visitors-count').text(1);}).fail(function(){console.log('Failed to create');});}}).fail(function({responseJSON}){console.log('LeanCloud Counter Error: '+responseJSON.code+' '+responseJSON.error);});}$(function(){$.get('https://app-router.leancloud.cn/2/route?appId='+'HzU5gDhBUYHF8QTF8DmbGhjD-gzGzoHsz').done(function({api_server}){var Counter=function(method,url,data){return $.ajax({method:method,url:'https://'+api_server+'/1.1'+url,headers:{'X-LC-Id':'HzU5gDhBUYHF8QTF8DmbGhjD-gzGzoHsz','X-LC-Key':'wp1HNJ17SdpnE0wIFq99eTKH','Content-Type':'application/json',},data:data});};  const localhost=/http:\/\/(localhost|127.0.0.1|0.0.0.0)/;if(localhost.test(document.URL))return;addCount(Counter);});});</script>

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
  

  

  

  


  <!-- Tidio 在线联系功能、鼠标点击特效、页面反馈...-->
  


  
    <canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas>
    <script async src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script>
    <script async src="/js/cursor/explosion.min.js"></script>
  



<script>//禁止右键
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("欢迎光临寒舍，有什么需要帮忙的话，请与站长联系！谢谢您的合作！！！");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){
if(window.event.keyCode == 12) {
window.event.returnValue=false;
return(false);
}
}
</script>


  <script>//禁止F12
function fuckyou(){
window.close(); //关闭当前窗口(防抽)
window.location="https://space.bilibili.com/13563835"; //将当前窗口跳转置空白页
}

function click(e) {
if (document.all) {
  if (event.button==2||event.button==3) {
alert("欢迎光临寒舍，有什么需要帮忙的话，请与站长联系！谢谢您的合作！！！");
oncontextmenu='return false';
}

}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
fuckyou();
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){
if(window.event.keyCode == 123) {
fuckyou();
window.event.returnValue=false;
return(false);
}
}
</script>




  
  <script async src="//code.tidio.co/XXXXXXXX.js"></script>







  <script src="/js/src/activate-power-mode.min.js"></script>
  <script>
    POWERMODE.colorful = true;
    POWERMODE.shake = false;
    document.body.addEventListener('input', POWERMODE);
  </script>






  <script async language="javascript">

    var div = document.createElement("div");
    //插入到自定义的theme-info或者copyright之后
    var copyright = document.querySelector(".theme-info2") || document.querySelector(".copyright");

    function show_run_time(){
        window.setTimeout("show_run_time()", 1000);
      // BirthDay=new Date("03/07/2020 20:00:00");
        BirthDay=new Date("07/02/2020 10:00:00");
        today=new Date();
        timeold=(today.getTime()-BirthDay.getTime());
        sectimeold=timeold/1000
        secondsold=Math.floor(sectimeold);
        msPerDay=24*60*60*1000
        e_daysold=timeold/msPerDay
        daysold=Math.floor(e_daysold);
        e_hrsold=(e_daysold-daysold)*24;
        hrsold=setzero(Math.floor(e_hrsold));
        e_minsold=(e_hrsold-hrsold)*60;
        minsold=setzero(Math.floor((e_hrsold-hrsold)*60));
        seconds=setzero(Math.floor((e_minsold-minsold)*60));

        // 使用zh-Hans.yml的文字替换
        div.innerHTML = "我已在此等候你 " + "<span style='color: #1890ff'> " + daysold + " </span> 天 <span style='color: #1890ff'>" + hrsold + " </span>时 <span style='color: #1890ff'>" + minsold + " </span>分 <span style='color: #1890ff'>" + seconds + " </span>秒 ";

        document.querySelector(".footer-inner").insertBefore(div, copyright.nextSibling);

    }
    function setzero(i){
        if (i<10)
        {i="0" + i};
        return i;
    }

    show_run_time();

  </script>




<!-- 旋转魔方 -->

   
      
<style>
    .cube_container {
      width: 50px;
      height: 60px;
      margin: 0 auto;
      position: fixed;
      z-index: 999;
      -webkit-perspective: 1000px;
              perspective: 1000px;
      right: 0px;
      bottom: 0px;
      -webkit-transform: translate(-50%, -50%);
              transform: translate(-50%, -50%);
    }

    .cube {
      /*
      width: 100%;
      height: 100%;
      */
      width: 0%; /* 大角度旋转 */
      position: absolute;
      -webkit-transform-style: preserve-3d;
      transform-style: preserve-3d;
      -webkit-transform: rotateX(-15deg) rotateY(-20deg) translateZ(-100px);
      transform: rotateX(-15deg) rotateY(-20deg) translateZ(-100px);
      -webkit-transform-origin: center center -100px;
      transform-origin: center center -100px;
      -webkit-animation: around 5s cubic-bezier(0.94, -0.6, 0.45, 1.31) infinite;
      animation: around 5s cubic-bezier(0.94, -0.6, 0.45, 1.31) infinite;
    }
    .cube div {
      width: 50px;
      height: 50px;
      display: block;
      margin: 0;
      position: absolute;
    }
    .cube div a {
      color: white;
      font-size: 12px;
      text-decoration: none;
      text-align: center;
      position: fixed;
      top: 50%;
      left: 45%;
      -webkit-transform: translate(-50%, -50%);
              transform: translate(-50%, -50%);
    }
    .cube .front {
      -webkit-transform: rotateY(0deg) translateZ(25px);
              transform: rotateY(0deg) translateZ(25px);
      background-color: rgba(0, 191, 255, 0.7);
      border: 1px solid rgba(0, 191, 255, 0.7);
    }
    .cube .back {
      -webkit-transform: rotateX(180deg) translateZ(25px);
              transform: rotateX(180deg) translateZ(25px);
      background-color: rgba(124, 252, 0, 0.7);
      border: 1px solid rgba(124, 252, 0, 0.7);
    }
    .cube .left {
      -webkit-transform: rotateY(-90deg) translateZ(25px);
              transform: rotateY(-90deg) translateZ(25px);
      background-color: rgba(255, 215, 0, 0.7);
      border: 1px solid rgba(255, 215, 0, 0.7);
    }
    .cube .right {
      -webkit-transform: rotateY(90deg) translateZ(25px);
              transform: rotateY(90deg) translateZ(25px);
      background-color: rgba(255, 69, 0, 0.7);
      border: 1px solid rgba(255, 69, 0, 0.7);
    }
    .cube .top {
      -webkit-transform: rotateX(90deg) translateZ(25px);
              transform: rotateX(90deg) translateZ(25px);
      background-color: rgba(255, 0, 157, 0.7);
      border: 1px solid rgba(255, 0, 157, 0.7);
    }
    .cube .bottom {
      -webkit-transform: rotateX(-90deg) translateZ(25px);
              transform: rotateX(-90deg) translateZ(25px);
      background-color: rgba(184, 111, 220, 0.7);
      border: 1px solid rgba(184, 111, 220, 0.7);
    }

     @-webkit-keyframes around {
      100% {
        -webkit-transform: rotateX(-15deg) rotateY(-380deg) translateZ(-100px);
                transform: rotateX(-15deg) rotateY(-380deg) translateZ(-100px);
      }
    }

    @keyframes around {
      100% {
        -webkit-transform: rotateX(-15deg) rotateY(-380deg) translateZ(-100px);
        transform: rotateX(-15deg) rotateY(-380deg) translateZ(-100px);
      }
    }
</style>

<div class="cube_container">
	  <div class="cube">
	    <div class="front"><a onclick="back2top()" rel="nofollow"> 欢迎光临 </a></div>
	    <div class="back"><a onclick="back2top()" rel="nofollow"> ❤️ </a></div>
	    <div class="right"><a onclick="back2top()" rel="nofollow"> 孤桜懶契 </a></div>
	    <div class="GYLQ"><a onclick="back2top()" role="button" rel="nofollow"> 请多关照 </a></div>
	    <div class="top"><a href="https://github.com/GYLQ/GYLQ.github.io" target="_blank" rel="nofollow"> ❤️ </a></div>
	    <div class="bottom"><a href="https://github.com/GYLQ/GYLQ.github.io" target="_blank" rel="nofollow"> ❤️ </a></div>
	  </div>
</div>

<script>

  function back2top(){
    $('html, body').animate({scrollTop: 0}, 500);
  }

</script>

   


<!-- Console 输出第三方个性化字体 -->

  <script async type="text/javascript" src="/figlet/fetch.min.js"></script>
  <script type="text/javascript" src="/figlet/figlet.js"></script>
  <script type="text/javascript">

      figlet.defaults({fontPath: "/figlet/fonts"});
      figlet("Welcome To Leaface", "Big Money-ne", function(err, text) {
          if (err) {
              console.log("something went wrong...");
              console.dir(err);
              return;
          }
          console.log(text);
      });
  </script>


  <!-- Console 输出自定义字体 -->
  
    <script async type="text/javascript">
        var text = "Welcome To Leaface";
        var date = '2021-07-19';
        console.log("%c " + text, "font-size:100px;color:white;border-radius:20px;height:200px; background:-webkit-linear-gradient(yellow,orange,red,green,blue,purple);text-shadow: 0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);");
        console.info('\n' + ' %c Leafae Site %c https://www.liaofuzhan.com ' + '\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
        console.info('\n' + ' %c Leafae QQ %c 793458585 ' + '\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
        console.info('\n' + ' %c Leafae Wechat %c leaface ' + '\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
       // console.log("%c Time: " + date, "font-size:100px;white:"+fcolor+";border-radius:20px;height:200px; background:-webkit-linear-gradient(yellow,orange,red,green,blue,purple);text-shadow: 0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);  background-image: linear-gradient(to right, orangered, orange, gold, lightgreen, cyan, dodgerblue, mediumpurple, hotpink, orangered);");
       // console.log("%c .", "padding:300px 600px;line-height:10px;background:url(https://s2.ax1x.com/2019/10/17/KkoAJJ.md.png) no-repeat;");
    </script>
  


  <!-- 看板娘 -->
  
      <script async src="/live2d-widget/autoload.js"></script>
  

  

  

  <!-- 代码块复制功能 -->
  <script async type="text/javascript" src="/js/src/clipboard.min.js"></script>
  <script async type="text/javascript" src="/js/src/clipboard-use.js"></script>

  <!--share.js-->
  <link async rel="stylesheet" href="/sharejs/css/share.min.css">
  <script async src="/sharejs/js/social-share.min.js"></script>

  <!-- 模仿知乎卡片样式链接、崩溃欺骗特效 -->
  <script async type="text/javascript" src="/js/src/linkcard.js"></script>

  <!--崩溃欺骗 放在js文件最后-->
  <!--
  <script type="text/javascript" src="/js/src/crash_cheat.js"></script>
  -->

 
    <script src="https://player.lmih.cn/player/js/player.js" id="myhk" key="159368326389" m="1"></script>
 

<script async>window.onload=function(){var a=document.createElement('script'),b=document.getElementsByTagName('script')[0];a.type='text/javascript',a.async=!0,a.src='/sw-register.js?v='+Date.now(),b.parentNode.insertBefore(a,b)};</script></body></html>